package cn.layfolk.daimao.consts;

public enum ErrorCodeEnum {
    PARAM_EMPTY_EXCEPTION(15001, "必填参数为空"),
    ACCOUNT_DOES_NOT_EXIST(18001, "账户不存在"),
    USER_NOT_LOGIN(60003101, "获取用户信息失败"),
    OP_ERROR(60003000, "非法操作"),
    SECKILL_NOT_STARTED(60003001, "秒杀活动尚未开始"),
    SECKILL_IS_STOP(60003002, "秒杀活动已经结束"),
    REPEATE_ORDEER_ERROR(60003003, "请不要重复下单"),
    OUT_OF_STOCK_ERROR(60003004, "你来晚了，商品以售光"),
    CREATE_ORDER_FAILED(6003101, "订单创建失败"),
    VERIFY_CODE_ERROR(6003102, "验证码错误");


    private Integer statusCode;
    private String message;

    ErrorCodeEnum(Integer statusCode, String message) {
        this.statusCode = statusCode;
        this.message = message;
    }

    @Override
    public String toString() {
        return "ErrorCodeEnum{" +
                "statusCode=" + statusCode +
                ", message='" + message + '\'' +
                '}';
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public String getMessage() {
        return message;
    }
}
